﻿Imports System.Data
Imports System.Data.SqlClient
Partial Class Client_frmTransaction
    Inherits System.Web.UI.Page
    Dim _UserId As String
    Dim _BO As New Bo

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Page.Response.Cache.SetCacheability(HttpCacheability.NoCache)
        _UserId = Session("UserId")
        If Not Page.IsPostBack Then
            If _UserId = "" Then
                Response.Redirect("frmLogin.aspx")
            Else
                GridData()
            End If
        End If
    End Sub

    Sub GridData()
        Dim amt As Double
        amt = 0
        Dim dtAddToCart As DataTable
        dtAddToCart = _BO.getTotal(_UserId)
        If dtAddToCart.Rows.Count = 0 Then
            MsgBox("No Items In Your Bag")
            Response.Redirect("frmDataList.aspx")
        End If
        
        Dim content As String
        'content = "<table style='border: 1px; border-color: White; border-style: solid'><tr><td>Quantity </td><td>" + dtAddToCart.Rows(0).Item(0) + "</td></tr><tr><td>Net Payable Amount</td><td>" + Session("netAmount") + "</td></tr></table>"
        'lblDisplay.Text = content
        amount.Value = Session("netAmount")

    End Sub
End Class
